﻿using System;
using System.ComponentModel;
using System.IO;
using System.Runtime.Serialization;

namespace HalconDotNet
{
	/// <summary>Represents an instance of a bar code reader.</summary>
	// Token: 0x02000019 RID: 25
	[Serializable]
	public class HBarCode : HHandle, ISerializable, ICloneable
	{
		// Token: 0x06000168 RID: 360 RVA: 0x0000883B File Offset: 0x00006A3B
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HBarCode() : base(HHandleBase.UNDEF)
		{
		}

		// Token: 0x06000169 RID: 361 RVA: 0x00008848 File Offset: 0x00006A48
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HBarCode(IntPtr handle) : base(handle)
		{
			this.AssertSemType();
		}

		// Token: 0x0600016A RID: 362 RVA: 0x00008857 File Offset: 0x00006A57
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HBarCode(HHandle handle) : base(handle)
		{
			this.AssertSemType();
		}

		// Token: 0x0600016B RID: 363 RVA: 0x00008866 File Offset: 0x00006A66
		private void AssertSemType()
		{
			base.AssertSemType("barcode");
		}

		// Token: 0x0600016C RID: 364 RVA: 0x00008873 File Offset: 0x00006A73
		internal static int LoadNew(IntPtr proc, int parIndex, int err, out HBarCode obj)
		{
			obj = new HBarCode(HHandleBase.UNDEF);
			return obj.Load(proc, parIndex, err);
		}

		// Token: 0x0600016D RID: 365 RVA: 0x0000888C File Offset: 0x00006A8C
		internal static int LoadNew(IntPtr proc, int parIndex, int err, out HBarCode[] obj)
		{
			HTuple htuple;
			err = HTuple.LoadNew(proc, parIndex, err, out htuple);
			obj = new HBarCode[htuple.Length];
			for (int i = 0; i < htuple.Length; i++)
			{
				obj[i] = new HBarCode(HalconAPI.IsLegacyHandleMode() ? htuple[i].IP : htuple[i].H);
			}
			htuple.Dispose();
			return err;
		}

		/// <summary>
		///   Read a bar code model from a file and create a new model.
		///   Modified instance represents: Handle of the bar code model.
		/// </summary>
		/// <param name="fileName">Name of the bar code model file. Default: "bar_code_model.bcm"</param>
		// Token: 0x0600016E RID: 366 RVA: 0x000088FC File Offset: 0x00006AFC
		public HBarCode(string fileName)
		{
			IntPtr proc = HalconAPI.PreCall(1988);
			HalconAPI.StoreS(proc, 0, fileName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Create a model of a bar code reader.
		///   Modified instance represents: Handle for using and accessing the bar code model.
		/// </summary>
		/// <param name="genParamName">Names of the generic parameters that can be adjusted for the bar code model. Default: []</param>
		/// <param name="genParamValue">Values of the generic parameters that can be adjusted for the bar code model. Default: []</param>
		// Token: 0x0600016F RID: 367 RVA: 0x00008948 File Offset: 0x00006B48
		public HBarCode(HTuple genParamName, HTuple genParamValue)
		{
			IntPtr proc = HalconAPI.PreCall(2001);
			HalconAPI.Store(proc, 0, genParamName);
			HalconAPI.Store(proc, 1, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(genParamName);
			HalconAPI.UnpinTuple(genParamValue);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Create a model of a bar code reader.
		///   Modified instance represents: Handle for using and accessing the bar code model.
		/// </summary>
		/// <param name="genParamName">Names of the generic parameters that can be adjusted for the bar code model. Default: []</param>
		/// <param name="genParamValue">Values of the generic parameters that can be adjusted for the bar code model. Default: []</param>
		// Token: 0x06000170 RID: 368 RVA: 0x000089A8 File Offset: 0x00006BA8
		public HBarCode(string genParamName, double genParamValue)
		{
			IntPtr proc = HalconAPI.PreCall(2001);
			HalconAPI.StoreS(proc, 0, genParamName);
			HalconAPI.StoreD(proc, 1, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		// Token: 0x06000171 RID: 369 RVA: 0x000089FC File Offset: 0x00006BFC
		void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
		{
			HSerializedItem hserializedItem = this.SerializeBarCodeModel();
			byte[] value = hserializedItem;
			hserializedItem.Dispose();
			info.AddValue("data", value, typeof(byte[]));
		}

		// Token: 0x06000172 RID: 370 RVA: 0x00008A34 File Offset: 0x00006C34
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HBarCode(SerializationInfo info, StreamingContext context)
		{
			HSerializedItem hserializedItem = new HSerializedItem((byte[])info.GetValue("data", typeof(byte[])));
			this.DeserializeBarCodeModel(hserializedItem);
			hserializedItem.Dispose();
		}

		/// <summary>Serialize object to binary stream in HALCON format</summary>
		// Token: 0x06000173 RID: 371 RVA: 0x00008A74 File Offset: 0x00006C74
		public new void Serialize(Stream stream)
		{
			HSerializedItem hserializedItem = this.SerializeBarCodeModel();
			hserializedItem.Serialize(stream);
			hserializedItem.Dispose();
		}

		/// <summary>Deserialize object from binary stream in HALCON format</summary>
		// Token: 0x06000174 RID: 372 RVA: 0x00008A88 File Offset: 0x00006C88
		public new static HBarCode Deserialize(Stream stream)
		{
			HBarCode hbarCode = new HBarCode();
			HSerializedItem hserializedItem = HSerializedItem.Deserialize(stream);
			hbarCode.DeserializeBarCodeModel(hserializedItem);
			hserializedItem.Dispose();
			return hbarCode;
		}

		// Token: 0x06000175 RID: 373 RVA: 0x00008AAE File Offset: 0x00006CAE
		object ICloneable.Clone()
		{
			return this.Clone();
		}

		// Token: 0x06000176 RID: 374 RVA: 0x00008AB8 File Offset: 0x00006CB8
		public new HBarCode Clone()
		{
			HSerializedItem hserializedItem = this.SerializeBarCodeModel();
			HBarCode hbarCode = new HBarCode();
			hbarCode.DeserializeBarCodeModel(hserializedItem);
			hserializedItem.Dispose();
			return hbarCode;
		}

		/// <summary>
		///   Deserialize a bar code model.
		///   Modified instance represents: Handle of the bar code model.
		/// </summary>
		/// <param name="serializedItemHandle">Handle of the serialized item.</param>
		// Token: 0x06000177 RID: 375 RVA: 0x00008AE0 File Offset: 0x00006CE0
		public void DeserializeBarCodeModel(HSerializedItem serializedItemHandle)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1986);
			HalconAPI.Store(proc, 0, serializedItemHandle);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(serializedItemHandle);
		}

		/// <summary>
		///   Serialize a bar code model.
		///   Instance represents: Handle of the bar code model.
		/// </summary>
		/// <returns>Handle of the serialized item.</returns>
		// Token: 0x06000178 RID: 376 RVA: 0x00008B34 File Offset: 0x00006D34
		public HSerializedItem SerializeBarCodeModel()
		{
			IntPtr proc = HalconAPI.PreCall(1987);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HSerializedItem result;
			num = HSerializedItem.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Read a bar code model from a file and create a new model.
		///   Modified instance represents: Handle of the bar code model.
		/// </summary>
		/// <param name="fileName">Name of the bar code model file. Default: "bar_code_model.bcm"</param>
		// Token: 0x06000179 RID: 377 RVA: 0x00008B7C File Offset: 0x00006D7C
		public void ReadBarCodeModel(string fileName)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1988);
			HalconAPI.StoreS(proc, 0, fileName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Write a bar code model to a file.
		///   Instance represents: Handle of the bar code model.
		/// </summary>
		/// <param name="fileName">Name of the bar code model file. Default: "bar_code_model.bcm"</param>
		// Token: 0x0600017A RID: 378 RVA: 0x00008BC8 File Offset: 0x00006DC8
		public void WriteBarCodeModel(string fileName)
		{
			IntPtr proc = HalconAPI.PreCall(1989);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, fileName);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Access iconic objects that were created during the search or decoding of bar code symbols.
		///   Instance represents: Handle of the bar code model.
		/// </summary>
		/// <param name="candidateHandle">Indicating the bar code results respectively candidates for which the data is required. Default: "all"</param>
		/// <param name="objectName">Name of the iconic object to return. Default: "candidate_regions"</param>
		/// <returns>Objects that are created as intermediate results during the detection or evaluation of bar codes.</returns>
		// Token: 0x0600017B RID: 379 RVA: 0x00008C04 File Offset: 0x00006E04
		public HObject GetBarCodeObject(HTuple candidateHandle, string objectName)
		{
			IntPtr proc = HalconAPI.PreCall(1990);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, candidateHandle);
			HalconAPI.StoreS(proc, 2, objectName);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(candidateHandle);
			HObject result;
			num = HObject.LoadNew(proc, 1, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Access iconic objects that were created during the search or decoding of bar code symbols.
		///   Instance represents: Handle of the bar code model.
		/// </summary>
		/// <param name="candidateHandle">Indicating the bar code results respectively candidates for which the data is required. Default: "all"</param>
		/// <param name="objectName">Name of the iconic object to return. Default: "candidate_regions"</param>
		/// <returns>Objects that are created as intermediate results during the detection or evaluation of bar codes.</returns>
		// Token: 0x0600017C RID: 380 RVA: 0x00008C64 File Offset: 0x00006E64
		public HObject GetBarCodeObject(string candidateHandle, string objectName)
		{
			IntPtr proc = HalconAPI.PreCall(1990);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, candidateHandle);
			HalconAPI.StoreS(proc, 2, objectName);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			HObject result;
			num = HObject.LoadNew(proc, 1, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Get the alphanumerical results that were accumulated during the decoding of bar code symbols.
		///   Instance represents: Handle of the bar code model.
		/// </summary>
		/// <param name="candidateHandle">Indicating the bar code results respectively candidates for which the data is required. Default: "all"</param>
		/// <param name="resultName">Names of the resulting data to return. Default: "decoded_types"</param>
		/// <returns>List with the results.</returns>
		// Token: 0x0600017D RID: 381 RVA: 0x00008CBC File Offset: 0x00006EBC
		public HTuple GetBarCodeResult(HTuple candidateHandle, string resultName)
		{
			IntPtr proc = HalconAPI.PreCall(1991);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, candidateHandle);
			HalconAPI.StoreS(proc, 2, resultName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(candidateHandle);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Get the alphanumerical results that were accumulated during the decoding of bar code symbols.
		///   Instance represents: Handle of the bar code model.
		/// </summary>
		/// <param name="candidateHandle">Indicating the bar code results respectively candidates for which the data is required. Default: "all"</param>
		/// <param name="resultName">Names of the resulting data to return. Default: "decoded_types"</param>
		/// <returns>List with the results.</returns>
		// Token: 0x0600017E RID: 382 RVA: 0x00008D1C File Offset: 0x00006F1C
		public HTuple GetBarCodeResult(string candidateHandle, string resultName)
		{
			IntPtr proc = HalconAPI.PreCall(1991);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, candidateHandle);
			HalconAPI.StoreS(proc, 2, resultName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Decode bar code symbols within a rectangle.
		///   Instance represents: Handle of the bar code model.
		/// </summary>
		/// <param name="image">Input image.</param>
		/// <param name="codeType">Type of the searched bar code. Default: "EAN-13"</param>
		/// <param name="row">Row index of the center. Default: 50.0</param>
		/// <param name="column">Column index of the center. Default: 100.0</param>
		/// <param name="phi">Orientation of rectangle in radians. Default: 0.0</param>
		/// <param name="length1">Half of the length of the rectangle along the reading direction of the bar code. Default: 200.0</param>
		/// <param name="length2">Half of the length of the rectangle perpendicular to the reading direction of the bar code. Default: 100.0</param>
		/// <returns>Data strings of all successfully decoded bar codes.</returns>
		// Token: 0x0600017F RID: 383 RVA: 0x00008D74 File Offset: 0x00006F74
		public HTuple DecodeBarCodeRectangle2(HImage image, HTuple codeType, HTuple row, HTuple column, HTuple phi, HTuple length1, HTuple length2)
		{
			IntPtr proc = HalconAPI.PreCall(1992);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, image);
			HalconAPI.Store(proc, 1, codeType);
			HalconAPI.Store(proc, 2, row);
			HalconAPI.Store(proc, 3, column);
			HalconAPI.Store(proc, 4, phi);
			HalconAPI.Store(proc, 5, length1);
			HalconAPI.Store(proc, 6, length2);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(codeType);
			HalconAPI.UnpinTuple(row);
			HalconAPI.UnpinTuple(column);
			HalconAPI.UnpinTuple(phi);
			HalconAPI.UnpinTuple(length1);
			HalconAPI.UnpinTuple(length2);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(image);
			return result;
		}

		/// <summary>
		///   Decode bar code symbols within a rectangle.
		///   Instance represents: Handle of the bar code model.
		/// </summary>
		/// <param name="image">Input image.</param>
		/// <param name="codeType">Type of the searched bar code. Default: "EAN-13"</param>
		/// <param name="row">Row index of the center. Default: 50.0</param>
		/// <param name="column">Column index of the center. Default: 100.0</param>
		/// <param name="phi">Orientation of rectangle in radians. Default: 0.0</param>
		/// <param name="length1">Half of the length of the rectangle along the reading direction of the bar code. Default: 200.0</param>
		/// <param name="length2">Half of the length of the rectangle perpendicular to the reading direction of the bar code. Default: 100.0</param>
		/// <returns>Data strings of all successfully decoded bar codes.</returns>
		// Token: 0x06000180 RID: 384 RVA: 0x00008E28 File Offset: 0x00007028
		public string DecodeBarCodeRectangle2(HImage image, string codeType, double row, double column, double phi, double length1, double length2)
		{
			IntPtr proc = HalconAPI.PreCall(1992);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, image);
			HalconAPI.StoreS(proc, 1, codeType);
			HalconAPI.StoreD(proc, 2, row);
			HalconAPI.StoreD(proc, 3, column);
			HalconAPI.StoreD(proc, 4, phi);
			HalconAPI.StoreD(proc, 5, length1);
			HalconAPI.StoreD(proc, 6, length2);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			string result;
			num = HalconAPI.LoadS(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(image);
			return result;
		}

		/// <summary>
		///   Detect and read bar code symbols in an image.
		///   Instance represents: Handle of the bar code model.
		/// </summary>
		/// <param name="image">Input image. If the image has a reduced domain, the bar code search is reduced to that domain. This usually reduces the runtime of the operator. However, if the bar code is not fully inside the domain, the bar code cannot be decoded correctly.</param>
		/// <param name="codeType">Type of the searched bar code. Default: "auto"</param>
		/// <param name="decodedDataStrings">Data strings of all successfully decoded bar codes.</param>
		/// <returns>Regions of the successfully decoded bar code symbols.</returns>
		// Token: 0x06000181 RID: 385 RVA: 0x00008EB4 File Offset: 0x000070B4
		public HRegion FindBarCode(HImage image, HTuple codeType, out HTuple decodedDataStrings)
		{
			IntPtr proc = HalconAPI.PreCall(1993);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, image);
			HalconAPI.Store(proc, 1, codeType);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(codeType);
			HRegion result;
			num = HRegion.LoadNew(proc, 1, num, out result);
			num = HTuple.LoadNew(proc, 0, num, out decodedDataStrings);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(image);
			return result;
		}

		/// <summary>
		///   Detect and read bar code symbols in an image.
		///   Instance represents: Handle of the bar code model.
		/// </summary>
		/// <param name="image">Input image. If the image has a reduced domain, the bar code search is reduced to that domain. This usually reduces the runtime of the operator. However, if the bar code is not fully inside the domain, the bar code cannot be decoded correctly.</param>
		/// <param name="codeType">Type of the searched bar code. Default: "auto"</param>
		/// <param name="decodedDataStrings">Data strings of all successfully decoded bar codes.</param>
		/// <returns>Regions of the successfully decoded bar code symbols.</returns>
		// Token: 0x06000182 RID: 386 RVA: 0x00008F2C File Offset: 0x0000712C
		public HRegion FindBarCode(HImage image, string codeType, out string decodedDataStrings)
		{
			IntPtr proc = HalconAPI.PreCall(1993);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, image);
			HalconAPI.StoreS(proc, 1, codeType);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HRegion result;
			num = HRegion.LoadNew(proc, 1, num, out result);
			num = HalconAPI.LoadS(proc, 0, num, out decodedDataStrings);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(image);
			return result;
		}

		/// <summary>
		///   Get the names of the parameters that can be used in set_bar_code* and get_bar_code* operators for a given bar code model
		///   Instance represents: Handle of the bar code model.
		/// </summary>
		/// <param name="properties">Properties of the parameters. Default: "trained_general"</param>
		/// <returns>Names of the generic parameters.</returns>
		// Token: 0x06000183 RID: 387 RVA: 0x00008F9C File Offset: 0x0000719C
		public HTuple QueryBarCodeParams(string properties)
		{
			IntPtr proc = HalconAPI.PreCall(1994);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, properties);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Get parameters that are used by the bar code reader when processing a specific bar code type. 
		///   Instance represents: Handle of the bar code model.
		/// </summary>
		/// <param name="codeTypes">Names of the bar code types for which parameters should be queried. Default: "EAN-13"</param>
		/// <param name="genParamName">Names of the generic parameters that are to be queried for the bar code model. Default: "check_char"</param>
		/// <returns>Values of the generic parameters.</returns>
		// Token: 0x06000184 RID: 388 RVA: 0x00008FEC File Offset: 0x000071EC
		public HTuple GetBarCodeParamSpecific(HTuple codeTypes, HTuple genParamName)
		{
			IntPtr proc = HalconAPI.PreCall(1995);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, codeTypes);
			HalconAPI.Store(proc, 2, genParamName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(codeTypes);
			HalconAPI.UnpinTuple(genParamName);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Get parameters that are used by the bar code reader when processing a specific bar code type. 
		///   Instance represents: Handle of the bar code model.
		/// </summary>
		/// <param name="codeTypes">Names of the bar code types for which parameters should be queried. Default: "EAN-13"</param>
		/// <param name="genParamName">Names of the generic parameters that are to be queried for the bar code model. Default: "check_char"</param>
		/// <returns>Values of the generic parameters.</returns>
		// Token: 0x06000185 RID: 389 RVA: 0x00009050 File Offset: 0x00007250
		public HTuple GetBarCodeParamSpecific(string codeTypes, string genParamName)
		{
			IntPtr proc = HalconAPI.PreCall(1995);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, codeTypes);
			HalconAPI.StoreS(proc, 2, genParamName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Get one or several parameters that describe the bar code model.
		///   Instance represents: Handle of the bar code model.
		/// </summary>
		/// <param name="genParamName">Names of the generic parameters that are to be queried for the bar code model. Default: "element_size_min"</param>
		/// <returns>Values of the generic parameters.</returns>
		// Token: 0x06000186 RID: 390 RVA: 0x000090A8 File Offset: 0x000072A8
		public HTuple GetBarCodeParam(HTuple genParamName)
		{
			IntPtr proc = HalconAPI.PreCall(1996);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, genParamName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(genParamName);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Get one or several parameters that describe the bar code model.
		///   Instance represents: Handle of the bar code model.
		/// </summary>
		/// <param name="genParamName">Names of the generic parameters that are to be queried for the bar code model. Default: "element_size_min"</param>
		/// <returns>Values of the generic parameters.</returns>
		// Token: 0x06000187 RID: 391 RVA: 0x00009100 File Offset: 0x00007300
		public HTuple GetBarCodeParam(string genParamName)
		{
			IntPtr proc = HalconAPI.PreCall(1996);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, genParamName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Set selected parameters of the bar code model for selected bar code types
		///   Instance represents: Handle of the bar code model.
		/// </summary>
		/// <param name="codeTypes">Names of the bar code types for which parameters should be set. Default: "EAN-13"</param>
		/// <param name="genParamName">Names of the generic parameters that shall be adjusted for finding and decoding bar codes. Default: "check_char"</param>
		/// <param name="genParamValue">Values of the generic parameters that are adjusted for finding and decoding bar codes. Default: "absent"</param>
		// Token: 0x06000188 RID: 392 RVA: 0x00009150 File Offset: 0x00007350
		public void SetBarCodeParamSpecific(HTuple codeTypes, HTuple genParamName, HTuple genParamValue)
		{
			IntPtr proc = HalconAPI.PreCall(1997);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, codeTypes);
			HalconAPI.Store(proc, 2, genParamName);
			HalconAPI.Store(proc, 3, genParamValue);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(codeTypes);
			HalconAPI.UnpinTuple(genParamName);
			HalconAPI.UnpinTuple(genParamValue);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Set selected parameters of the bar code model for selected bar code types
		///   Instance represents: Handle of the bar code model.
		/// </summary>
		/// <param name="codeTypes">Names of the bar code types for which parameters should be set. Default: "EAN-13"</param>
		/// <param name="genParamName">Names of the generic parameters that shall be adjusted for finding and decoding bar codes. Default: "check_char"</param>
		/// <param name="genParamValue">Values of the generic parameters that are adjusted for finding and decoding bar codes. Default: "absent"</param>
		// Token: 0x06000189 RID: 393 RVA: 0x000091B0 File Offset: 0x000073B0
		public void SetBarCodeParamSpecific(string codeTypes, string genParamName, HTuple genParamValue)
		{
			IntPtr proc = HalconAPI.PreCall(1997);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, codeTypes);
			HalconAPI.StoreS(proc, 2, genParamName);
			HalconAPI.Store(proc, 3, genParamValue);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(genParamValue);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Set selected parameters of the bar code model.
		///   Instance represents: Handle of the bar code model.
		/// </summary>
		/// <param name="genParamName">Names of the generic parameters that shall be adjusted for finding and decoding bar codes. Default: "element_size_min"</param>
		/// <param name="genParamValue">Values of the generic parameters that are adjusted for finding and decoding bar codes. Default: 8</param>
		// Token: 0x0600018A RID: 394 RVA: 0x00009204 File Offset: 0x00007404
		public void SetBarCodeParam(HTuple genParamName, HTuple genParamValue)
		{
			IntPtr proc = HalconAPI.PreCall(1998);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, genParamName);
			HalconAPI.Store(proc, 2, genParamValue);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(genParamName);
			HalconAPI.UnpinTuple(genParamValue);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Set selected parameters of the bar code model.
		///   Instance represents: Handle of the bar code model.
		/// </summary>
		/// <param name="genParamName">Names of the generic parameters that shall be adjusted for finding and decoding bar codes. Default: "element_size_min"</param>
		/// <param name="genParamValue">Values of the generic parameters that are adjusted for finding and decoding bar codes. Default: 8</param>
		// Token: 0x0600018B RID: 395 RVA: 0x00009254 File Offset: 0x00007454
		public void SetBarCodeParam(string genParamName, double genParamValue)
		{
			IntPtr proc = HalconAPI.PreCall(1998);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, genParamName);
			HalconAPI.StoreD(proc, 2, genParamValue);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>Delete a bar code model and free the allocated memory</summary>
		/// <param name="barCodeHandle">Handle of the bar code model.</param>
		// Token: 0x0600018C RID: 396 RVA: 0x00009298 File Offset: 0x00007498
		public static void ClearBarCodeModel(HBarCode[] barCodeHandle)
		{
			HTuple htuple = HHandleBase.ConcatArray(barCodeHandle);
			IntPtr proc = HalconAPI.PreCall(2000);
			HalconAPI.Store(proc, 0, htuple);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(htuple);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(barCodeHandle);
		}

		/// <summary>
		///   Delete a bar code model and free the allocated memory
		///   Instance represents: Handle of the bar code model.
		/// </summary>
		// Token: 0x0600018D RID: 397 RVA: 0x000092DC File Offset: 0x000074DC
		public void ClearBarCodeModel()
		{
			IntPtr proc = HalconAPI.PreCall(2000);
			base.Store(proc, 0);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Create a model of a bar code reader.
		///   Modified instance represents: Handle for using and accessing the bar code model.
		/// </summary>
		/// <param name="genParamName">Names of the generic parameters that can be adjusted for the bar code model. Default: []</param>
		/// <param name="genParamValue">Values of the generic parameters that can be adjusted for the bar code model. Default: []</param>
		// Token: 0x0600018E RID: 398 RVA: 0x00009310 File Offset: 0x00007510
		public void CreateBarCodeModel(HTuple genParamName, HTuple genParamValue)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(2001);
			HalconAPI.Store(proc, 0, genParamName);
			HalconAPI.Store(proc, 1, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(genParamName);
			HalconAPI.UnpinTuple(genParamValue);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Create a model of a bar code reader.
		///   Modified instance represents: Handle for using and accessing the bar code model.
		/// </summary>
		/// <param name="genParamName">Names of the generic parameters that can be adjusted for the bar code model. Default: []</param>
		/// <param name="genParamValue">Values of the generic parameters that can be adjusted for the bar code model. Default: []</param>
		// Token: 0x0600018F RID: 399 RVA: 0x00009370 File Offset: 0x00007570
		public void CreateBarCodeModel(string genParamName, double genParamValue)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(2001);
			HalconAPI.StoreS(proc, 0, genParamName);
			HalconAPI.StoreD(proc, 1, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}
	}
}
